<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>文章类别修改</title>
    <link href="${ctx }/css/style.css" rel="stylesheet" type="text/css" />
    <link href="${ctx }/js/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="${ctx }/js/niceValidator/jquery.validator.css" />
    <script type="text/javascript" src="${ctx }/js/jquery/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="${ctx }/js/layer/layer.js"></script>
    <script type="text/javascript" src="${ctx }/js/niceValidator/jquery.validator.js"></script>
    <script type="text/javascript" src="${ctx }/js/niceValidator/local/zh_CN.js"></script>
    <script type="text/javascript" src="${ctx }/js/common.js"></script>
</head>
<body>
<div class="listNavTitle">
    <p>
        <label>文章管理 ></label>
        <label>文章类别管理</label>
    </p>
</div>
<div class="formbody">
  <div class="formtitle"><span>修改文章类型</span></div>
<form id="submitForm">
  <input type="hidden" name="id" value="${articleType.id}"/>
  <ul class="forminfo">
	 <li>
      <label>文章类型名称</label>
      <input name="name" value="${articleType.name}" type="text" class="dfinput"  data-rule="文章类型名称:required;"/>
   	 </li>
      <li>
          <labelstyle="width: auto">文章类型CODE</label>
          <select name="typeCode" id="typeCodeSel">
              <option value="">请选择</option>
          <#list typeCode?values as item>
              <option value="${item.dicValue}" <#if articleType.typeCode == item.dicValue>selected="selected"</#if>>${item.name}</option>
          </#list>
          </select>
      </li>
    <li>
      <label>&nbsp;</label>
      <button class="layui-btn layui-btn-normal" type="button" class="btn" id="submitBtn">确认保存</button>
    </li>
  </ul>
</form>
</div>
</body>
</html>
<script>
    $(document).ready(function(){
        $("#submitBtn").click(function(){
            var typeCodeSel = $("#typeCodeSel option:selected").val();
            if(panIsNull(typeCodeSel)){
                layer.alert("请选择文章类型CODE！");
                return;
            }
            baseEdit('${ctx }/sysman/articles/upChange.do');
        });

        dicList('1');
    });
</script>